<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>

<%@ page import="javax.portlet.RenderRequest" %>
<%@ page import="javax.portlet.RenderResponse" %>
<%@ page import="javax.portlet.PortletPreferences" %>

<%@ page session="false" %>

<portlet:defineObjects/>
<% 
	PortletPreferences prefs = renderRequest.getPreferences();
	String option = prefs.getValue("loginStatus", "loginStatus");
%>

<% if(option.equals("0") || option.equals("1")) { %>
	<% if (option.equals("loginFailed")) { %>
		<b>Login failed!!!</b>
	<% } %> 
	<div align="center">		
		<form method="post" action="<portlet:actionURL/>">
			<table width="100%">
				<tr>
					<td width="30%">Login: </td>
					<td width="70%"><input name="username" width="100%" size="30" type="text"></td>					
				</tr>
				<tr>
					<td width="30%">Haslo: </td>
					<td width="70%"><input name="password" width="100%" size="30" type="password"></td>					
				</tr>				
				<tr>
					<td colspan="2" align="center"><input type="submit" value="Zaloguj" ></td>
				</tr>
			</table>
		</form>
	</div>
<% } else if (option.equals("2")) { %>
	<table width="100%">
		<tr>
			<td align="center">Login success!!!</td>
		</tr>		
	</table>

<% } %>		

